[IA64] Add -rc support to sparse-merge
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 23 May 2006 21:10:27 +0000 (15:10 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 23 May 2006 21:10:27 +0000 (15:10 -0600)
Signed-off-by: Aron Griffis <aron@hp.com>
xen/arch/ia64/tools/sparse-merge

index 66433187c4f15dba3bd5b7ede7773f44eb6b83c6..83017bc4a7c3fc07204c711f31d0cf29b3fc30e3 100755 (executable)
@@ -33,9 +33,17 @@ fi
 cd $LINUXPATH || exit 1
 OLDCSET=$(hg parents | awk '/^changeset:/{print($2)}' | cut -f 1 -d :)
 for t in $OLDTAG $NEWTAG; do
+    [[ $t == *.* ]] || continue
     if ! hg tags | cut -f1 -d' ' | grep -Fx $t; then
        echo "Tag $t not found, ketching up"
-       hg up -C ${t%.*} || exit 1
+       if [[ $t == *-* ]]; then
+           # rc/pre/git versions start at the previous stable release
+           micro=${t%%-*}; micro=${micro##*.}
+           stable=${t%%-*}; stable=${stable%.*}.$((micro-1))
+           hg up -C $stable
+       else
+           hg up -C ${t%.*} || exit 1
+       fi
        ketchup ${t#v} || exit 1
        hg addremove
        hg ci -m $t